﻿// $Id$
/*! \file
 * \brief Definition of Northwind.DomainModel.Employee.
 *
 * \author $Author$
 * \date $Date$
 * \version $Revision$
 */

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Xml.Serialization;
using Salamanca.DataAccess;
using Salamanca.DataAccess.Collections;
using Salamanca.DataRules;
#if (!NET_CF)
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
#endif

namespace Northwind.DomainModel
{



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary />
    ///
    ///////////////////////////////////////////////////////////////////////////

    public partial interface IEmployeeContainer
    {
    }



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary />
    ///
    ///////////////////////////////////////////////////////////////////////////

    public partial interface IEmployeeMapper:
        IDataMapper
    {
    }



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary />
    ///
    ///////////////////////////////////////////////////////////////////////////

#if (!NET_CF)
    [Serializable]
    [DataObject]
#endif
    public partial class Employee:
        DomainEntity<Employee.PrimaryKey, Employee.DataTransfer>
    {

        /// <summary />
#if (!NET_CF)
        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
#endif
        public partial class PrimaryKey:
            PrimaryKey<int>
        {

            /// <summary />
            public PrimaryKey():
                base()
            {
            }

            /// <summary />
            public PrimaryKey(int key):
                base(key)
            {
            }

        }

        /// <summary />
        [SoapType("EmployeeData", "http://www.codeplex.com/salamanca/northwind/domainmodel/")]
        [XmlType("EmployeeData", Namespace="http://www.codeplex.com/salamanca/northwind/domainmodel/")]
#if (!NET_CF)
        [Serializable]
        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
#endif
        public partial class DataTransfer:
            IDataTransferObject
        {
        }

        /// <summary />
        public Employee():
            base()
        {
        }

        /// <summary />
        public Employee(DataMapperCollection dataMappers):
            base(dataMappers)
        {
        }

#if (!NET_CF)
        /// <summary />
        protected Employee(SerializationInfo info, StreamingContext context):
            base(info, context)
        {
        }
#endif

        /// <summary />
        [StringLengthRule(20)]
        [NotNullRule]
#if (!NET_CF)
        [DataObjectField(false, false, false)]
#endif
        public string LastName
        {
            get
            {
                return _LastNameProperty;
            }
            set
            {
                if (_LastNameProperty!=value)
                {
                    _LastNameProperty=value;
                    RaisePropertyChanged("LastName");
                }
            }
        }

        /// <summary />
        [StringLengthRule(10)]
        [NotNullRule]
#if (!NET_CF)
        [DataObjectField(false, false, false)]
#endif
        public string FirstName
        {
            get
            {
                return _FirstNameProperty;
            }
            set
            {
                if (_FirstNameProperty!=value)
                {
                    _FirstNameProperty=value;
                    RaisePropertyChanged("FirstName");
                }
            }
        }

        /// <summary />
        [StringLengthRule(30)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Title
        {
            get
            {
                return _TitleProperty;
            }
            set
            {
                if (_TitleProperty!=value)
                {
                    _TitleProperty=value;
                    RaisePropertyChanged("Title");
                }
            }
        }

        /// <summary />
        [StringLengthRule(25)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string TitleOfCourtesy
        {
            get
            {
                return _TitleOfCourtesyProperty;
            }
            set
            {
                if (_TitleOfCourtesyProperty!=value)
                {
                    _TitleOfCourtesyProperty=value;
                    RaisePropertyChanged("TitleOfCourtesy");
                }
            }
        }

        /// <summary />
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public System.DateTime? BirthDate
        {
            get
            {
                return _BirthDateProperty;
            }
            set
            {
                if (_BirthDateProperty!=value)
                {
                    _BirthDateProperty=value;
                    RaisePropertyChanged("BirthDate");
                }
            }
        }

        /// <summary />
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public System.DateTime? HireDate
        {
            get
            {
                return _HireDateProperty;
            }
            set
            {
                if (_HireDateProperty!=value)
                {
                    _HireDateProperty=value;
                    RaisePropertyChanged("HireDate");
                }
            }
        }

        /// <summary />
        [StringLengthRule(60)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Address
        {
            get
            {
                return _AddressProperty;
            }
            set
            {
                if (_AddressProperty!=value)
                {
                    _AddressProperty=value;
                    RaisePropertyChanged("Address");
                }
            }
        }

        /// <summary />
        [StringLengthRule(15)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string City
        {
            get
            {
                return _CityProperty;
            }
            set
            {
                if (_CityProperty!=value)
                {
                    _CityProperty=value;
                    RaisePropertyChanged("City");
                }
            }
        }

        /// <summary />
        [StringLengthRule(15)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Region
        {
            get
            {
                return _RegionProperty;
            }
            set
            {
                if (_RegionProperty!=value)
                {
                    _RegionProperty=value;
                    RaisePropertyChanged("Region");
                }
            }
        }

        /// <summary />
        [StringLengthRule(10)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string PostalCode
        {
            get
            {
                return _PostalCodeProperty;
            }
            set
            {
                if (_PostalCodeProperty!=value)
                {
                    _PostalCodeProperty=value;
                    RaisePropertyChanged("PostalCode");
                }
            }
        }

        /// <summary />
        [StringLengthRule(15)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Country
        {
            get
            {
                return _CountryProperty;
            }
            set
            {
                if (_CountryProperty!=value)
                {
                    _CountryProperty=value;
                    RaisePropertyChanged("Country");
                }
            }
        }

        /// <summary />
        [StringLengthRule(24)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string HomePhone
        {
            get
            {
                return _HomePhoneProperty;
            }
            set
            {
                if (_HomePhoneProperty!=value)
                {
                    _HomePhoneProperty=value;
                    RaisePropertyChanged("HomePhone");
                }
            }
        }

        /// <summary />
        [StringLengthRule(4)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Extension
        {
            get
            {
                return _ExtensionProperty;
            }
            set
            {
                if (_ExtensionProperty!=value)
                {
                    _ExtensionProperty=value;
                    RaisePropertyChanged("Extension");
                }
            }
        }

        /// <summary />
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Notes
        {
            get
            {
                return _NotesProperty;
            }
            set
            {
                if (_NotesProperty!=value)
                {
                    _NotesProperty=value;
                    RaisePropertyChanged("Notes");
                }
            }
        }

    }
}
